//
//  StatusForwardCell.swift
//  weibo_swift
//
//  Created by dulinlong on 15/7/5.
//  Copyright © 2015年 sheji_56. All rights reserved.
//

import UIKit
import FFAutoLayout

class StatusForwardCell: StatusCell {

    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        forwardLabel = UILabel(color: UIColor.darkGrayColor(), fontSize: 13, mutiLines: true)
        
        insertSubview(forwardLabel!, atIndex: 0)
        insertSubview(forwardButton, atIndex: 0)
        
        
        forwardButton.ff_AlignVertical(ff_AlignType.BottomLeft, referView:contentLabel, size:nil, offset: CGPoint(x: -12, y: 12))
        forwardButton.ff_AlignVertical(ff_AlignType.TopRight, referView: footerView, size: nil)
        
        forwardLabel!.ff_AlignInner(ff_AlignType.TopLeft, referView: forwardButton, size: nil, offset: CGPoint(x: 12, y: 12))
        forwardLabel!.preferredMaxLayoutWidth = screenWidth - 12

      let cons =  pictureView.ff_AlignVertical(ff_AlignType.BottomLeft, referView: forwardLabel!, size: CGSize(width: 290, height: 90), offset: CGPoint(x: 0, y: 12))
        
        consWidth = pictureView.ff_Constraint(cons, attribute: NSLayoutAttribute.Width)
        consHeight = pictureView.ff_Constraint(cons, attribute: NSLayoutAttribute.Height)
        
        
        
    }

    required init(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

    
    //MARK: - 懒加载数据
    lazy var forwardButton: UIButton = {
        let btn = UIButton()
        btn.backgroundColor = UIColor(white: 0.7, alpha: 1.0)
        return btn
        }()
    


}


